#ifndef jjb_dataset

#define jjb_dataset

#include <vector>
#include <string>
#include <map>
#include "record.h"
#include "common.h"
using namespace std;

class dataset
{
public:
	dataset(string filename, int size);

	int getRecordCount() { return nSize; }

	record* getNthRecord(int n) { return theRecords[n]; }

 
        void setCategories(map<string,int>& category);

	static bool isFieldCategorical(int nFld) { return (nFld >= 1 && nFld <= 3); }
        static string getFieldName(int nFld);
        static string getFieldValue(int nFld, int nValue);
        static string getAttackName(int nValue);

private:

	double getNextNumericField(string& sLine);
	string getNextStringField(string& sLine);

	record** theRecords; 
 
        int nSize;
};


#endif
